package com.len.controller;

import com.len.base.BaseController;
import com.len.entity.SpWithdraw;
import com.len.service.SpWithdrawService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("withdraw")
public class SpWithdrawController extends BaseController<SpWithdraw> {
    @Autowired
    private SpWithdrawService spWithdrawService;
    @RequestMapping("/save")
    public String save(SpWithdraw spWithdraw){
        try {
            spWithdrawService.insert(spWithdraw);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
    @RequestMapping("/update")
    public String update(SpWithdraw spWithdraw){
        try {
            spWithdrawService.updateByPrimaryKey(spWithdraw);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
    @RequestMapping("/show")
    public String show(SpWithdraw spWithdraw){
        try {
            spWithdrawService.selectByPrimaryKey(spWithdraw);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
